<?php if($this->session->flashdata('message_status') != "" && $this->session->flashdata('message_status') == "0"): ?>
	<?php $display = ""; ?>
	<div class="alert alert-danger">
		<i class="fa fa-fw fa-times-circle"></i> <?php echo $this->session->flashdata('message'); ?>
	</div>
<?php elseif($this->session->flashdata('message_status') == "1"): ?>
	<?php $display = "none"; ?>
	<div class="alert alert-success">
		<i class="fa fa-fw fa-check-circle"></i> <?php echo $this->session->flashdata('message'); ?>
	</div>
	<small><a href="<?php echo site_url('Admin/category') ?>"><i class="fa fa-arrow-left"></i> Back to category list</a></small>
<?php endif; ?>

<?php if(isset($display)): ?>
	<div style="display: none;">
<?php endif; ?>
<div>
	<form action="<?php echo site_url("Category/delete_category_process/$result[id_category]") ?>" method="POST">
		<table class="table table-bordered">
			<tr>
				<th>ID</th>
				<th>Category Name</th>
				<th>Category Date</th>
				<th>Icon</th>
				<th>Color</th>
			</tr>
			<tr>
				<td><?php echo $result['id_category'] ?></td>
				<td><?php echo $result['category_name'] ?></td>
				<td><?php echo $result['category_date'] ?></td>
				<td width="10%"><i class="fa fa-<?php echo $result['category_icon'] ?>"></i> <?php echo $result['category_icon'] ?></td>
				<td width="10%" style="color: <?php echo $result['category_color'] ?>"><i class="fa fa-stop"></i> <?php echo $result['category_color'] ?></td>
				<td align="center" width="20%">
				<input name="btn_cat_delete" type="submit" value="Delete Category" class="btn btn-danger btn-sm"/>
					<a href="<?php echo site_url('Admin/category') ?>" class="btn btn-warning btn-sm">Cancel</a>
				</td>
			</tr>
		</table>
	</form>
</div>